/*
 * Copyright 2010-2012 Susanta Tewari. <freecode4susant@users.sourceforge.net>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package genomemap.netbeans.jobs1.tab08;

import cef.command.Command;
import cef.command.TestModelIDCommand;
import cef.command.listener.TestModelIDLHoodCurveOC;
import cef.command.listener.TestModelIDPrintWriter;
import cef.pui.EventConstructionException;
import cef.pui.EventImpl;
import commons.nb.jobs.Job;
import commons.nb.jobs.gui.JobsGUIUtil;
import commons.nb.jobs.properties.ComboPropertyImpl;
import genomemap.cef.pui.TestTAB08ModelIDEventImpl;
import genomemap.nb.jobs.properties.Propertys_Gen;

/**
 *
 *
 * @version 1.3.0
 * @author Susanta Tewari
 * @history Created on 3/15/13
 * @since 1.3.0
 */
public class TestModelID_TAB08_Job extends Job<TestTAB08ModelIDEventImpl> {

    public TestModelID_TAB08_Job() {

        setName("test-model-ID-tab08");
        setDisplayName("Model ID: TAB08");
        setShortDescription("Tests model ID for model TAB08");


        // data
        addComboProperty(Propertys_Gen.BUILDER_DATA_TAB08Data());


        // model generator
        addComboProperty(new ComboPropertyImpl(Propertys_Gen.GENERATORS_MODEL_TAB08()));


        // data simulator
        addComboProperty(new ComboPropertyImpl(Propertys_Gen.SIMULATORS_DATA_TAB08()));


        // lhood algorithm
        addComboProperty(new ComboPropertyImpl(Propertys_Gen.ALGO_LHOOD_TAB08()));


        // listeners
        addCommandOutputListener(new TestModelIDPrintWriter());
        addCommandOutputListener(JobsGUIUtil.makeEmbeddable(new TestModelIDLHoodCurveOC()));
    }

    @Override
    protected TestTAB08ModelIDEventImpl createEvent() throws EventConstructionException {
        return new TestTAB08ModelIDEventImpl(getProperties());
    }

    @Override
    protected Command createCommand(final TestTAB08ModelIDEventImpl event) {
        return new TestModelIDCommand<>(event);
    }

    @Override
    public boolean isCancellable() {
        return TestModelIDCommand.isCancellable();
    }

    @Override
    public Class<? extends EventImpl> getEventImplType() {
        return TestTAB08ModelIDEventImpl.class;
    }
}
